package com.lion.ball.modules.admin.web.model.result;

import com.lion.ball.modules.admin.web.model.data.LongCodeData;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author Chris Chan
 * Create On 2025/8/26 下午5:43
 * Use for: 购物车 参数
 * Explain:
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "购物车 参数")
public class TestResult extends LongCodeData implements Serializable {
    private static final long serialVersionUID = 1L;

    // 主键
    @Schema(description = "主键", example = "1")
    private Long id;

    // 商品编码 实际上应该是SKU编码
    @Schema(description = "名称", example = "石头")
    private String name;

    // 数量
    @Schema(description = "数量", example = "1")
    private int num;

    public TestResult(Long code, Long id, String name, int num) {
        super(code);
        this.id = id;
        this.name = name;
        this.num = num;
    }
}
